<?php

namespace App\library\services\lib;

use App\library\services\BaseServices;
use App\library\services\lib\aliyun\Oss;
use App\library\services\lib\tencentCloud\Cos;

class FIleUploadService extends BaseServices
{
    /**
     * Author:Zhongyuan Lu
     * 文件上传
     * @param string $realPath 临时路径
     * @param string $ext   文件扩展名
     * @return array
     */
    public static function uploadFile($realPath,$ext)
    {
        $filename = md5(uniqid()) . '.' . $ext;
        $oss = new Oss();
        return $oss->upload($filename, $realPath);
    }
}
